package com.weixin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author gpf
 * @since 2018-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "工号不能为空")
    @Length(min = 4,max = 8,message = "工号为长度4-8的数字组成")
    private Integer enumber;

    /**
     * 姓名
     */
    @NotNull(message = "姓名不能为空")
    @Length(min = 2,max = 6,message = "姓名为长度在2-6的字符")
    private String ename;

    /**
     * 性别0：女   1：男
     */
    private Integer esex;

    /**
     * 年龄
     */
    @NotNull(message = "年龄不能为空")
    @Size(min = 18,max = 40,message = "年龄必须在18到40岁之间")
    private Integer eage;

    /**
     * 籍贯
     */
    @NotNull(message = "籍贯不能为空")
    private String enative;

    /**
     * 身份证号
     */
    @NotNull(message = "请输入身份证号码")
    @Length(min = 18,max = 19,message = "请核实身份证信息")
    private Integer eidnumber;

    /**
     * 婚姻情况 0：未婚  1：已婚
     */
    private Integer marital;

    /**
     * 文化水品
     */
    private String culturalLevel;

    /**
     * 职位
     */
    private String postion;

    @NotNull(message = "请输入部门信息")
    private Integer did;

    @NotNull(message = "请输入角色信息")
    private Integer roleId;

    private Integer password;
}
